﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Model.Models.EmpresaModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Escolher Loja</h2>

<table>
    <tr>
        <th>
            Nome
        </th>
        <th>
            Email
        </th>
        <th>
            Telefone
        </th>
        <th>
            Rua
        </th>
        <th>
            Bairro
        </th>
        <th>
            Cidade
        </th>
        <th>
            Estado
        </th>
        <th>
              Opções
        </th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.Nome) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Email) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Telefone) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Rua) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Bairro) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Cidade) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Estado) %>
        </td>
        <td>
            <%: Html.ActionLink("Contatar", "Message", new { id = item.Id_Empresa })%> |
            <%: Html.ActionLink("Entrar na loja", "Create", "Venda", new { id = item.Id_Empresa }, null)%>
        </td>
    </tr>
<% } %>

</table>
            <%: Html.ActionLink("Relatório", "RelatorioVendaByCliente", new { id = 9 })%> |
            <%: Html.ActionLink("Historico de Pedidos", "ListarPedidos", new { id = 9 })%> 
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <input type="button" value="Cadastre-se" class="button dark" onclick="location.href='<%: Url.Action("Create", "Cliente") %>'" />
            
</asp:Content>
